package com.example.village.service.impl;

import com.example.village.dao.SubscribeMsgDao;
import com.example.village.entity.SubscribeMsgEntity;
import com.example.village.service.SubscribeMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubscribeMsgImpl implements SubscribeMsgService {

    @Autowired
    private SubscribeMsgDao subscribeMsgDao;

    @Override
    public List<SubscribeMsgEntity> query(SubscribeMsgEntity subscribeMsgEntity) {
        return subscribeMsgDao.query(subscribeMsgEntity);
    }

    @Override
    public Boolean insert(SubscribeMsgEntity subscribeMsgEntity) {
        return subscribeMsgDao.insert(subscribeMsgEntity) > 0;
    }

    @Override
    public Boolean delete(Integer uId) {
        return subscribeMsgDao.delete(uId) > 0;
    }
}
